@echo off

set SETUP="%programfiles%\inno setup 5\iscc.exe"
set QTDIR=%SystemDrive%\Qt\4.6.4
set PATH=%SystemDrive%\Qt\4.6.4\bin
set PATH=%PATH%;%SystemDrive%\MinGW\bin
set PATH=%PATH%;%SystemRoot%\System32
set QMAKESPEC=win32-g++

qmake colortray.pro CONFIG+=release
mingw32-make
mingw32-make clean

COPY xcalib-0.8\xcalib.exe release\
COPY %QTDIR%\bin\libgcc_s_dw2-1.dll release\
COPY %QTDIR%\bin\mingwm10.dll release\
COPY %QTDIR%\bin\QtCore4.dll release\
COPY %QTDIR%\bin\QtGui4.dll release\

ECHO Y | DEL Makefile*
ECHO Y | DEL *.exe
ECHO Y | DEL *.o
ECHO Y | DEL deploy\*.o
ECHO Y | DEL deploy\*.exe

%SETUP% colortray.iss
